export const reducer = (state, action) => {
  if (action.type === 'reset') {
    return { ...state, contractList: [], currentAddressList: [] }
  }
  return { ...state, [action.type]: action.data }
}

export const initialState = {
  toType: 'EMS',
  theme: {},
  caseDetail: {},
  data: {},
  common: {},
  refreshCurrentTableFn: () => {},
  dictionaries: {},
  staffs: [],
  notaries: [],
  arbitrators: [],
  addressList: [],
  contractList: [],
  currentAddressList: [],
  electronicAddressList: [],
  currentElectronicAddressList: [],
  files: [],
  fileList: []
}
